package com.atguigu4.search_sort.exer1;

/**
 * @author NoobMaster69  * @date 2024/5/27 0027 星期一 15:34
 */
public class ArrayExer_1 {
    public static void main(String[] args) {
        int[] arr= new int[]{1,2,3,4,5};
        int[] newArr = new int[arr.length << 1];

        for (int i = 0; i < arr.length; i++) {
            newArr[i] = arr[i];
        }


        newArr[arr.length] = 10;
        newArr[arr.length + 1] = 20;
        newArr[arr.length + 2] = 30;

        for (int i = 0; i < newArr.length; i++) {
            System.out.print(newArr[i] + "\t");
        }
    }
}
